package org.example.kg_back.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.kg_back.PoJo.entity.Company;

import java.util.List;

/**
 * @Author Colonnello
 * @Gitee https://gitee.com/niuzhengchao
 * @Date 2021/3/15 9:44
 */
@Mapper
public interface CompanyMapper extends BaseMapper<Company> {

	@Select("SELECT company_name,COUNT(*) as count,SUM(delay_count) as delayCount FROM company_number GROUP BY company_name ORDER BY COUNT(*) DESC LIMIT 19;")
	List<Company> findCompanyDelay();
}
